package merchants;

import java.io.*;

public class MerchantDataWrite {
    public boolean DataWrite(){
        BufferedWriter out;
        try {
            out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("卖家账号信息.txt"),"utf-8"));
            MerchantDAOArrayList MDAOAL = new MerchantDAOArrayList();
            MerchantDataRead MDR = new MerchantDataRead();
            MDAOAL = MDR.getMerchants();
            for (Merchant M:MDAOAL.getMerchantArrayList()) {
                out.write(M.toString());
            }
            out.close();
        }  catch (IOException e) {
            e.printStackTrace();
        }

        return true;
    }
}
